package com.example.demo.restController;


import com.example.demo.entiy.Article;
import com.example.demo.entiy.Comment;
import com.example.demo.entiy.User;
import com.example.demo.mapper.ArticleMapper;
import com.example.demo.mapper.UserAuthorityMapper;
import com.example.demo.mapper.UserMapper;
import com.example.demo.service.ArticleService;
import com.example.demo.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;

import java.util.List;

@org.springframework.web.bind.annotation.RestController
public class RestController {

    @Autowired
    ArticleService articleService;

    @GetMapping("/testRestController")
    public Article testRestController() {
        Article article = articleService.getArticleCommentByArticleId(2);
        return article;
    }

}
